<!DOCTYPE html>
<html>
	<head>
		<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
		<meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport" />
		<meta content="telephone=no" name="format-detection" />
		<meta content="address=no" name="format-detection" />
		<meta name="apple-mobile-web-app-capable" content="no" />
		<link rel="apple-touch-icon-precomposed" href="http://img0.zz91.com/zz91/images/logo.png" />
		<link rel="apple-touch-icon-precomposed" sizes="114x114" href="apple-touch-icon-precomposed" />
		<meta name="apple-touch-fullscreen" content="YES">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="shortcut icon" href="http://img0.zz91.com/front/favicon.ico" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="http://b.zz91.com/layui/css/layui.css"/>	
		<script type="text/javascript" src="http://b.zz91.com/layui/layui.js"></script>
		<style>
			.mainbox{
				margin: 10px;
			}
		</style>
	</head>
	<body>
		<div class="mainbox">
			<form class="layui-form" action="category_save.html" method="post">
				<!--<div class="layui-form-item">
				    <label class="layui-form-label">编号</label>
				    <div class="layui-input-block">
				      	<input type="text" name="id" lay-verify="title" autocomplete="off" placeholder="请输入编号" class="layui-input">
				    </div>
			  	</div>-->
				<div class="layui-form-item">
				    <label class="layui-form-label"><span style="color: red;">*</span>分站（分公司）</label>
				    <div class="layui-input-block">
				      	<select name="ucompany_id" id="ucompany_id" lay-verify="required">
				      		<option value="">请选择...</option>
				      		{%for list in company_list%}
							<option value="{{list.id}}">{{list.name}}</option>
							{%endfor%}
				      	</select>
				    </div>
				    <script>selectoption("ucompany_id","{{result.company_id}}")</script>
			  	</div>
			  	<div class="layui-form-item">
				    <label class="layui-form-label"><span style="color: red;">*</span>品名</label>
				    <div class="layui-input-block">
				      	<input type="text" name="name" lay-verify="required" autocomplete="off" placeholder="请输入品名" class="layui-input">
				    </div>
			  	</div>
			  	
				<div class="layui-form-item layui-col">
					<div class="layui-input-block">
					    <button type="reset" class="layui-btn layui-btn-primary layui-col-xs2">清除</button>
					    <button class="layui-btn layui-btn-normal layui-col-xs2" lay-submit="" lay-filter="demo1">保存</button>
					</div>
				</div>
				<input type="hidden" name="company_id" value="{{company_id}}" />
				<input type="hidden" name="group_id" value="{{group_id}}" />
				<input type="hidden" name="sub_selfid" value="{{sub_selfid}}" />
			</form>
		</div>
			
	</body>
	<script>
		layui.use(['form', 'layedit', 'laydate'], function(){
		  var form = layui.form
		  ,layer = layui.layer
		  ,layedit = layui.layedit
		  
		  //自定义验证规则
		  form.verify({
		  	pass: [/(.+){6,12}$/, '密码必须6到12位']
		    ,content: function(value){
		      layedit.sync(editIndex);
		    }
		  });
		});
	</script>
</html>
